package cn.liontalk.ChainResponsibilityPattern;

import cn.liontalk.ChainResponsibilityPattern.hander.PriceHandler;

/**
 * @author: 周哲
 * @package: cn.liontalk.ChainResponsibilityPattern
 * @description:
 * @date: 2019/1/9 20:03
 * @version: V1.0
 */
public class Sales extends PriceHandler {
    @Override
    public void processDiscount(float discount) {
        if(discount<=0.05){
            System.out.format("%s批准了折后是：%.2f%n",this.getClass().getName(),discount);
        }else{
            successor.processDiscount(discount);
        }
    }
}
